-- card: 20959 from stack: in.0 -- bmap block id: 21184 -- flags: 0000 -- background id: 15491 -- name: buttons ----- HyperTalk script ----- -- This handler resets this cd on closeCard lock screen set hilite of btn id 20 to false set hilite of btn id 21 to false set the textSize of cd fld "textFld" to 14 set the textHeight of cd fld "textFld" to 15 set the textStyle of cd fld "textFld" to plain set the textFont of cd fld "textFld" to Futura put empty into cd fld "timeFld" unlock screen end closeCard -- part 16 (button) -- low flags: 00 -- high flags: 0001 -- rect: left=246 top=255 right=282 bottom=276 -- title width / last selected line: 0 -- icon id / first selected line: 3839 / 3839 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: rightPlug -- part 13 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=81 top=191 right=223 bottom=113 -- title width / last selected line: 0 -- icon id / first selected line: 3412 / 3412 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: scissors1 -- part 1 (button) -- low flags: 00 -- high flags: A001 -- rect: left=42 top=186 right=229 bottom=152 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 174 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: I'm hiding something ----- HyperTalk script ----- on mouseUp set cursor to none hide me repeat for 5 set the icon of btn "scissors1" to "scissors1" wait 10 set the icon of btn "scissors1" to "scissors2" wait 10 end repeat show me choose browse tool end mouseUp -- part 2 (field) -- low flags: 01 -- high flags: 0007 -- rect: left=31 top=248 right=290 bottom=169 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 9 -- style flags: 0 -- line height: 10 -- part name: nameFldF -- part 3 (button) -- low flags: 00 -- high flags: 8006 -- rect: left=28 top=292 right=308 bottom=170 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Sort by Last Name ----- HyperTalk script ----- on mouseUp set hilite of btn "Sort By First Name" to false set hilite of me to true set the scroll of cd fld "nameFldL" to 0 show cd fld "nameFldL" hide cd fld "nameFldF" end mouseUp -- part 4 (button) -- low flags: 00 -- high flags: C006 -- rect: left=28 top=307 right=323 bottom=172 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Sort by First Name ----- HyperTalk script ----- on mouseUp set hilite of btn "Sort By Last Name" to false set hilite of me to true set the scroll of cd fld "nameFldF" to 0 show cd fld "nameFldF" hide cd fld "nameFldL" end mouseUp -- part 9 (field) -- low flags: 01 -- high flags: 0002 -- rect: left=318 top=234 right=258 bottom=424 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 174 -- text size: 10 -- style flags: 0 -- line height: 13 -- part name: TimeFld -- part 10 (button) -- low flags: 00 -- high flags: A002 -- rect: left=315 top=248 right=265 bottom=427 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 174 -- text size: 10 -- style flags: 0 -- line height: 13 -- part name: What time is it? ----- HyperTalk script ----- on mouseUp put the long time into cd fld "TimeFld" end mouseUp -- part 12 (button) -- low flags: 00 -- high flags: A004 -- rect: left=312 top=303 right=328 bottom=439 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 174 -- text size: 14 -- style flags: 0 -- line height: 18 -- part name: Do some addition ----- HyperTalk script ----- on mouseUp ask "Please enter a number." put it into Num1 ask "Please enter another number." put it into Num2 put num1 + num2 into theAnswer answer Num1 && "+" && Num2 && "=" && theAnswer & "." end mouseUp -- part 14 (field) -- low flags: 81 -- high flags: 0007 -- rect: left=31 top=248 right=290 bottom=169 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 9 -- style flags: 0 -- line height: 10 -- part name: nameFldL -- part 15 (button) -- low flags: 00 -- high flags: 0001 -- rect: left=192 top=255 right=282 bottom=222 -- title width / last selected line: 0 -- icon id / first selected line: 589 / 589 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: leftPlug -- part 17 (button) -- low flags: 80 -- high flags: 0000 -- rect: left=222 top=179 right=207 bottom=251 -- title width / last selected line: 0 -- icon id / first selected line: 7743 / 7743 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Bulb -- part 5 (button) -- low flags: 00 -- high flags: 2000 -- rect: left=193 top=197 right=281 bottom=275 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: ----- HyperTalk script ----- -- Do the little animation on the "H" btn on mouseUp set cursor to none lock screen hide btn "leftPlug" hide btn "rightPlug" unlock screen with barn door open lock screen show btn "Bulb" unlock screen repeat for 10 set the right of btn "Bulb" to 246 wait 5 set the right of btn "Bulb" to 251 wait 5 end repeat lock screen hide btn "Bulb" show btn "leftPlug" show btn "rightPlug" unlock screen choose browse tool end mouseUp -- part 18 (field) -- low flags: 01 -- high flags: 0000 -- rect: left=71 top=50 right=163 bottom=412 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 174 -- text size: 14 -- style flags: 0 -- line height: 15 -- part name: textFld -- part 20 (button) -- low flags: 00 -- high flags: A005 -- rect: left=296 top=185 right=202 bottom=431 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Change the Font ----- HyperTalk script ----- on mouseUp if (the textFont of cd fld "textFld" is "Futura") then lock screen set the textFont of cd fld "textFld" to Geneva set the textSize of cd fld "textFld" to 12 unlock screen else lock screen set the textFont of cd fld "textFld" to Futura set the textSize of cd fld "textFld" to 14 set the textHeight of cd fld "textFld" to 15 unlock screen end if end mouseUp -- part 21 (button) -- low flags: 00 -- high flags: A005 -- rect: left=296 top=201 right=222 bottom=449 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Make the font bold ----- HyperTalk script ----- on mouseUp if (the textStyle of cd fld "textFld" is "plain") then set the textStyle of cd fld "textFld" to bold else set the textStyle of cd fld "textFld" to plain end if end mouseUp -- part 11 (button) -- low flags: 00 -- high flags: A003 -- rect: left=328 top=275 right=296 bottom=416 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Move Me ----- HyperTalk script ----- on mouseUp put the loc of me into startLoc put the loc of me into playLoc repeat for 3 put random(512) into theH put random(342) into theV put theH into item 1 of playLoc put theV into item 2 of playLoc set the Loc of me to playLoc wait 15 end repeat set the loc of me to startLoc end mouseUp -- part contents for card part 2 ----- text ----- Blaise Pascal Cecelia James David Paffner Julia Greenwood Kanae Ito Martha Sorites Rebecca Soldner Washington Pulver -- part contents for card part 14 ----- text ----- Greenwood, Julia Ito, Kanae James, Cecelia Paffner, David Pascal, Blaise Pulver, Washington Soldner, Rebecca Sorites, Martha -- part contents for card part 18 ----- text ----- Something happens when you click on a HyperCard button: you go to another card, or an animation starts, or... almost any action can be caused by clicking on a button. On this card are sample buttons to show you a few of the actions buttons can start. (The buttons below also demonstrate all the styles that HyperCard buttons can have.)